package cn.breeze.user.mapper;

import cn.breeze.user.domain.Logininfo;
import cn.breeze.basic.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author breeze
 * @since 2022-07-05
 */
public interface LogininfoMapper extends BaseMapper<Logininfo> {

    /**
    * @Title: loadByUsernameAndType
    * @Description: 根据用户名和类型查询
    * @Author: Mr.D
    * @Version: 1.0
    * @Date:  2022/7/7 13:20
    * @Parameters: [username, type]
    * @Return cn.breeze.user.domain.Logininfo
    */
    Logininfo loadByUsernameAndType(@Param("username") String username,@Param("type") String type);

    /**
    * @Title: loadByPhoneAndType
    * @Description: 根据手机号和类型查询
    * @Author: Mr.D
    * @Version: 1.0
    * @Date:  2022/7/8 16:00
    * @Parameters: [phone]
    * @Return cn.breeze.user.domain.Logininfo
    */
    Logininfo loadByPhoneAndType(@Param("phone") String phone, @Param("type") String type);

    /**
    * @Title: loadByUserId
    * @Description: 根据用户id查询
    * @Author: Mr.D
    * @Version: 1.0
    * @Date:  2022/7/10 15:18
    * @Parameters: [userId]
    * @Return cn.breeze.user.domain.Logininfo
    */
    Logininfo loadByUserId(Long userId);
}
